home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3901 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.lang.c
  2. Path: nntp.coast.net!torn!nott!emr1!jagrant
  3. From: jagrant@emr1.emr.ca (John Grant)
  4. Subject: Re: Unbuffered character input...
  5. Message-ID: <DM2D7s.3EI@emr1.emr.ca>
  6. Organization: Energy, Mines, and Resources, Ottawa
  7. References: <Pine.SGI.3.91.960129190205.27936A-100000@tahiti.cs.unm.edu> <4elf0t$5vd@ixnews2.ix.netcom.com> <4em2oaINN54i@keats.ugrad.cs.ubc.ca>
  8. Date: Wed, 31 Jan 1996 21:04:40 GMT
  9.  
  10. In article <4em2oaINN54i@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
  11. >In article <4elf0t$5vd@ixnews2.ix.netcom.com>,
  12. >Kevin Landry <kevgar@ix.netcom.com> wrote:
  13. >>Caleb Haley <chaley@tahiti.cs.unm.edu> wrote:
  14. >>
  15. >>>Greetings!
  16. >>
  17. >>>Just curious--is there a way to do unbuffered character input in c?
  18. >>>i.e.  getting just one character without waiting for a carriage return 
  19. >>>(enter)...
  20. >>
  21. >>I believe there are two commands in C that do this. getch() is
  22. >>unbuffered input without echo and getche() has the echo. Hope this
  23. >>helps.
  24. >
  25. >Sigh. C doesn't have commands. C has statements. The getch() and getche() that
  26. >you describe are library functions---system-specific library functions,
  27. >moreover.  They are not part of the standard library.
  28. >
  29. >To those of you who have been regulars of this group for a while, please bear
  30. >with me: I will surely kick the habit of responding to clueless DOS
  31. >programmers before long. In the past week, I've seen the stupid "how do I get
  32. >single characters from the keyboard" asked about thirty times! The replies
  33. >are often worse than the questions.
  34.  
  35.     Would you be as insulting to 'clueless UNIX programmers' who
  36.     asked the same question or provided a similar answer?
  37. -- 
  38. John A. Grant                        jagrant@emr1.emr.ca
  39. Airborne Geophysics
  40. Geological Survey of Canada, Ottawa
  41.